<template>
  <div class="storage-statistics">
    <!-- 标题 -->
    <div class="panel-header">
      <h3 class="panel-title">存储空间</h3>
    </div>
    <!-- 内容 -->
    <div class="panel-content">
      <!-- 空间存储使用率 -->
      <div class="storage-usage-rate">
        <div class="storage-usage-rate-value1">
          已使用<span class="value-highlight">40.0%</span>
        </div>
        <div class="storage-usage-rate-value2">200.00<span class="unit">G</span></div>
        <div class="storage-usage-rate-title">空间存储使用率</div>
      </div>
      <!-- 空间 -->
      <div class="storage-space">
        <div class="storage-space-item">
          <div class="value">500<span class="unit">G</span></div>
          <div class="label">总存储空间</div>
        </div>
        <div class="storage-space-item">
          <div class="value">300<span class="unit">G</span></div>
          <div class="label">剩余储空间</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
// 存储空间统计组件
</script>

<style lang="scss" scoped>
.storage-statistics {
  width: 404px;
  height: 258px;
  background: url('@/assets/images/dashboard_normal_model_bg.png') no-repeat center center;
  background-size: 100% 100%;
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  
  .panel-header {
    height: 38px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
    
    .panel-title {
      font-size: 18px;
      font-weight: 900;
      letter-spacing: 2px;
      line-height: 18px;
      vertical-align: top;
      background: linear-gradient(180deg, rgba(238, 238, 238, 1) 0%, rgba(238, 238, 238, 1) 40%, rgba(59, 135, 202, 1) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      filter: drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.5));
      position: relative;
      bottom: -2px;
    }
  }
  
  .panel-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;

    // 空间存储使用率
    .storage-usage-rate {
      width: 168px;
      height: 144px;
      background: url('@/assets/images/dashboard_storage_statistics_img1.png') no-repeat center center;
      background-size: 100% 100%;
      padding-top: 30px;
      margin-right: 18px;
      box-sizing: border-box;
      .storage-usage-rate-value1 {
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0px;
        line-height: 12px;
        color: rgba(255, 255, 255, 1);
        text-align: center;
        margin-bottom: 12px;
        .value-highlight {
          padding-left: 3px;
          font-size: 12px;
          font-weight: 500;
          letter-spacing: 0px;
          line-height: 12px;
          color: rgba(254, 225, 101, 1);
          padding-left: 3px;
        }
      }
      .storage-usage-rate-value2 {
        font-size: 22px;
        font-weight: 500;
        letter-spacing: 0px;
        line-height: 22px;
        color: rgba(0, 255, 244, 1);
        margin-bottom: 38px;
        text-align: center;
        .unit {
          font-size: 14px;
          font-weight: 400;
          letter-spacing: 0px;
          line-height: 14px;
          color: rgba(0, 255, 244, 1);
          padding-left: 5px;
        }
      }
      .storage-usage-rate-title {
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0px;
        line-height: 13px;
        color: rgba(237, 234, 233, 1);
        text-align: center;
      }
    }

    // 空间
    .storage-space {
      .storage-space-item {
        width: 185px;
        height: 80px;
        background: url('@/assets/images/dashboard_storage_statistics_img2.png') no-repeat center center;
        background-size: 100% 100%;
        display: flex;
        flex-flow: column nowrap;
        justify-content: center;
        align-items: center;
        & + .storage-space-item {
          margin-top: 16px;
        }
        .value {
          font-size: 32px;
          font-weight: 400;
          letter-spacing: 0px;
          line-height: 32px;
          color: rgba(0, 255, 244, 1);
          text-align: center;
          margin-bottom: 4px;
          .unit {
            font-size: 18px;
            font-weight: 400;
            letter-spacing: 0px;
            line-height: 18px;
            color: rgba(0, 255, 244, 1);
            padding-left: 5px;
          }
        }
        .label {
          font-size: 16px;
          font-weight: 400;
          letter-spacing: 0px;
          line-height: 16px;
          color: rgba(255, 255, 255, 0.85);
          text-align: center;
        }
      }
    }
  }
}
</style>